<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <script src="./js/axios.js"></script>
    <script>
        axios
            .post('http://www.localhost:3000/axios', {
                uname: 'jerry',
                pwd: 123414,
            })
            .then((ret) => {
                const {
                    data: res
                } = ret;
                console.log(res);
            });
        axios
            .put('http://www.localhost:3000/axios/123', {
                uname: 'tom',
                pwd: 42313,
            })
            .then((ret) => {
                const {
                    data: res
                } = ret;
                console.log(res);
            });
        var params = new URLSearchParams();
        params.append('uname', 'snake');
        params.append('pwd', '142133');
        axios.post('http://www.localhost:3000/axios', params).then((ret) => {
            const {
                data: res
            } = ret;
            console.log(res);
        });
    </script>
</body>

</html>